home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / '92_HACK / IR_MAN_ / CD_ROM.H < prev    next >
Text File  |  1992-06-07  |  2KB  |  89 lines

  1. /* Some constants, from the CD SC Developer's Guide chapter 7 */
  2. #define    TRACKADDR    2
  3. #define    STEREO        9
  4. #define    INPROGRESS    0
  5. #define    MSFADDR        1
  6.  
  7. /* Some commands, from the CD SC Developer's Guide chapter 7 */
  8. #define    APLAY    104
  9. #define    ASTOP    106
  10. #define ASTATUS    107
  11. #define APAUSE    105
  12. #define ASTATUS    107
  13. #define ASCAN   108
  14. #define csReadQ 101
  15.  
  16.  
  17. /* The resource ID I use for my error dialog */
  18. #define errorID    128
  19.  
  20. struct AudioStateStruct {
  21.     Byte    aStatusFlags;
  22.     Byte    playMode;
  23.     Byte    controlField;
  24.     Byte    absMinBCD;
  25.     Byte    absSecBCD;
  26.     Byte    absBlkBCD;
  27. };
  28. typedef struct AudioStateStruct AudioStateStruct;
  29.  
  30. typedef struct AStatusRec {
  31.     ParamBlockHeader
  32.     short        ioRefNum;
  33.     short        csCode;
  34.     struct {
  35.         Byte    audioStatus;
  36.         Byte    playMode;
  37.         Byte    cntlField;
  38.         Byte    minutes;
  39.         Byte    seconds;
  40.         Byte    frames;
  41.     } csParam;
  42. } AStatusRec;
  43.  
  44. typedef struct AScanRec {
  45.     ParamBlockHeader
  46.     short        ioRefNum;
  47.     short        csCode;
  48.     struct {
  49.         short    commandType;
  50.         Byte    addr[4];
  51.         short    direction;
  52.     } csParam;
  53. } AScanRec;
  54.  
  55. typedef struct ReadQRec {
  56.     ParamBlockHeader
  57.     short        ioRefNum;
  58.     short        csCode;
  59.     struct {
  60.         Byte    cntlField;
  61.         Byte    track;
  62.         Byte    index;
  63.         Byte    trackMinutes;
  64.         Byte    trackSeconds;
  65.         Byte    trackFrames;
  66.         Byte    discMinutes;
  67.         Byte    discSeconds;
  68.         Byte    discFrames;
  69.     } csParam;
  70. } ReadQRec;
  71.  
  72.  
  73. /* prototype function declarations. */
  74. short Decimal2BCD(short n);
  75. short BCD2Decimal(short n);
  76. OSErr    AStop(short, short);
  77. OSErr    APlay(short, short);
  78. OSErr    Play(short, short);
  79. short    GetDrvRefNum(short);
  80. OSErr   APause(short state, short refNum);
  81. OSErr    CDEject(short ioRefNum);
  82. OSErr    AScan(short state, short refNum);
  83. pascal    OSErr AStatus(short ioRefNum, AudioStateStruct *aState);
  84. pascal    OSErr GetCurrTrack(short ioRefNum, short * Track);
  85. OSErr    ATrackSkip(short state, short refNum);
  86.  
  87.  
  88.  
  89.